#include "Actors/Weapons.txt"
#include "actors/pickups.txt"
#include "actors/Trees.txt"
#include "actors/Lights.txt"
#include "actors/Deco.txt"
#include "actors/fx.txt"

actor aaplayer : playerpawn
{
  player.viewheight 48
  Player.StartItem "AAFist"
  Player.Displayname "Amulets Player"
  Player.WeaponSlot 1,  "AAFist"
  Player.WeaponSlot 3, "IronSword", "SilverSword"
  Player.WeaponSlot 6, "Xbow"

}


   



//===========================================================
//---------------------------------------------------ENEMIES
//===========================================================




//===========================================================
//---------------------------------------------------NPCS
//===========================================================





KING
{
DoomEdNum 20050
Sprite KING
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Guard1
{
DoomEdNum 20051
Sprite GARD
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Guard2
{
DoomEdNum 20052
Sprite GARD
Frames "B"
Solid
Radius 24
Height 56
//$Category NPC's
}

John
{
DoomEdNum 20053
Sprite JOHN
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Keeper1
{
DoomEdNum 20054
Sprite KEEP
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Keeper2
{
DoomEdNum 20055
Sprite KEE2
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Keeper3
{
DoomEdNum 20056
Sprite KEE3
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}


Keeper4
{
DoomEdNum 20057
Sprite KEE4
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Keeper5
{
DoomEdNum 20058
Sprite KEE5
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Keeper6
{
DoomEdNum 20059
Sprite KEE6
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Keeper7
{
DoomEdNum 20060
Sprite KEE7
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

AAPeasant1
{
DoomEdNum 20061
Sprite PEAS
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

AAPeasant2

{
DoomEdNum 20062
Sprite PEAS
Frames "B"
Solid
Radius 24
Height 56
//$Category NPC's
}



Priest
{
DoomEdNum 20063
Sprite PRIE
Frames "A"
Solid
Radius 24
Height 56
//$Category NPC's
}

Guard3
{
//$Category NPC's
DoomEdNum 20064
Sprite GARD
Frames "C"
Solid
Radius 24
Height 56

}



actor shoppy 20065
{
   Health 20
   ConversationID 9
   Radius 20
   Height 56
   Speed 8
   PainChance 200
   +FLOORCLIP
   +SOLID
   +SHOOTABLE
   PainSound "grunt/pain"
   DeathSound "grunt/death"
   ActiveSound "grunt/active"
   //$Category NPC's
   States
   {
   Spawn:
       KEEP A 10
       Loop
   See:
       KEEP A 4 A_Wander
       Loop
   Pain:
       POSS G 3
       POSS G 3 A_Pain
       Goto See
   Death:
       POSS H 5
       POSS I 5 A_Scream
       POSS J 5 A_Fall
       POSS K 5
       POSS L -1
       Stop
   XDeath:
       POSS M 5
       POSS N 5 A_XScream
       POSS O 5 A_Fall
       POSS PQRST 5
       POSS U -1
       Stop
   }
}


//===========================================================
//---------------------------------------------------Spells
//===========================================================

actor ManaMissile
{
    Radius 8
    Height 6
    Speed 9
    Damage 20
    PROJECTILE
    RENDERSTYLE TRANSLUCENT
    ALPHA 0.8
    SeeSound "magflight/magfly6"
    DeathSound "explosions/explode5"
    States
    {
    Spawn:
        MANM BC 4 Bright
        MANM A 4 Bright a_playsound("magflight/magfly6")
        Loop
    Death:
        MANM DEFG 2 Bright
        Stop
    }
}

actor ElementalFire
{
    Radius 8
    Height 6
    Speed 10
    Damage 16
    explosiondamage 20
    explosionradius 64
    +SEEKERMISSILE
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.9
    SeeSound "magflight/magfly4"
    DeathSound "explosions/explode5"
    States
    {
    Spawn:
        HFBL BCBABCBA 3 Bright A_CStaffMissileSlither
        HFBL C 1 Bright a_playsound("magflight/magfly4")
        Loop
    Death:
        HFBL D 2 a_explode
        HFBL EFGHI 2
        Stop
    }
}

actor ElementalFire2
{
    Radius 8
    Height 6
    Speed 10
    Damage 16
    explosiondamage 20
    explosionradius 64
    +SEEKERMISSILE
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.9
    SeeSound "magflight/magfly4"
    DeathSound "explosions/explode5"
    States
    {
    Spawn:
        HFBL B 3 Bright A_Seekermissile(90,90)
        HFBL C 3 Bright A_CStaffMissileSlither
        HFBL B 3 Bright A_Seekermissile(90,90)
        HFBL A 3 Bright A_CStaffMissileSlither
        HFBL B 3 Bright A_Seekermissile(90,90)
        HFBL C 3 Bright A_CStaffMissileSlither
        HFBL B 3 Bright A_Seekermissile(90,90)
        HFBL A 3 Bright A_CStaffMissileSlither
        HFBL C 1 Bright a_playsound("magflight/magfly4")
        Loop
    Death:
        HFBL D 2 a_explode
        HFBL EFGHI 2
        Stop
    }
}

actor Push
{
    Radius 8
    Height 6
    Speed 50
    Damage 0
    +DONTBLAST
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.9
    SCALE 0.5
    SeeSound "magflight/magfly1"
    DeathSound "explosions/explode1"
    States
    {
    Spawn:
        PUSH A 9 Bright 
        goto death
    Death:
        PUSH B 2 
        PUSH CDEF 2
        Stop
    }
} 

actor Blink
{
    Radius 8
    Height 6
    Speed 50
    Damage 0
    +DONTBLAST
    PROJECTILE
    States
    {
    Spawn:
        NULL A 10
        goto death
          
    Death:
        PUSH B 2   Thing_ChangeTID (0,123)
        Stop
    }
}


actor Acid
{
    Radius 8
    Height 6
    Speed 20
    Damage 2
    explosiondamage 20
    explosionradius 200
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.5
    SCALE 0.25
    SeeSound "magflight/magfly1"
    DeathSound "explosions/explode8"
    States
    {
    Spawn:
        ACID BCBABCBA 3 Bright
        ACID C 1 Bright a_playsound("magflight/magfly1")
        Loop
    Death:
        ACID D 2 a_explode
        ACID EFGHI 2
        Stop
    }
}
      
actor Magicmissile
{
    Radius 8
    Height 6
    Speed 9
    Damage 3
    +SEEKERMISSILE
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.9
    SeeSound "Druid5"
    DeathSound "DSMAG1"
    States
    {
    Spawn:
        MAGM ABCD 2 Bright A_SeekerMissile (5,10)
        Loop
    Death:
        MAGM EFGH 2 Bright
        Stop
    }
}      
      
ACTOR BeeSpawner
{
   +MISSILE
    +NOGRAVITY
    +FLOAT
    +SPAWNFLOAT
   SeeSound "bees/attack"
   Speed 50
   States
   {
   Spawn:
   	NULL A 1 A_PlaySound("bees/attack")
        BEES ABABABABAB 1 Bright
        Goto death
   Death:
      MANM DEFG 2 Bright
      NULL A 0 Bright A_SpawnItem("Bees",-3,0,0)
      NULL A 0 Bright A_SpawnItem("Bees",-3,6,0)
      NULL A 0 Bright A_SpawnItem("Bees",-3,12,0)
      NULL A 0 Bright A_SpawnItem("Bees",-3,18,0)
      NULL A 0 Bright A_SpawnItem("Bees",-3,24,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,0,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,0,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,6,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,12,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,18,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,24,0)
      NULL A 0 Bright A_SpawnItem("Bees",-9,30,0)
      Stop
   } 
}

ACTOR Bees
{
    Health 1
    Radius 4
    Height 3
    Mass 10
    Speed 8
    Scale 0.2
    MeleeDamage 1
    +ISMONSTER
    +SHOOTABLE
    +FRIENDLY
    +NOGRAVITY
    +FLOAT
    +SPAWNFLOAT
    +DONTMORPH
    +PUSHABLE
    +NOBLOCKMONST
    +NOTARGETSWITCH
    ActiveSound "bees/fly"
    MeleeSound "bees/attack"
    DeathSound ""
    HitObituary "%o was killed by bees."
    States
    {
    Spawn:
        BEES A 1 A_Look
    See:
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 1 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
        BEES ABABAB 1 A_Chase
        BEES A 0 A_ActiveSound
	MANM DEFG 2 Bright
        Stop
    Melee:
        BEES A 1 A_FaceTarget
        BEES B 1 A_MeleeAttack
        BEES ABAB 1 A_Wander
        BEES A 0 A_ActiveSound
        goto see+64
    Death:
        BEES A 0 A_StopSound
        BEES C 1 A_Scream
        MANM DEFG 2 Bright
        Stop
    }
}


//===========================================================
//---------------------------------------------------GAMESTUFF
//===========================================================

ACTOR test6 : CUSTOMInventory
{
   +INVBAR
   Inventory.Amount 1
   Inventory.MaxAmount 100
   Inventory.PickupSound "misc/i_pkup"
   Inventory.UseSound "misc/p_pkup"
   Inventory.PickupMessage "TEST4"
   Inventory.Icon PINVA0
   +AUTOACTIVATE
   States
   {
   Spawn:
      PINV A 1 Bright
      Loop
   USE: 
      PINV B 1 A_FireCustomMissile("Blink",0,1,0,0) 
      stop
   } 
}


ACTOR test4 : CUSTOMInventory

{
   +AUTOACTIVATE
   States
   {
   USE: 
      PINV B 1 A_FireCustomMissile("Push",0,1,0,0) 
      stop
   } 
}

ACTOR test5 : CUSTOMInventory
{
   +INVBAR
   Inventory.Amount 1
   Inventory.MaxAmount 100
   Inventory.PickupSound "misc/i_pkup"
   Inventory.UseSound "misc/p_pkup"
   Inventory.PickupMessage "TEST4"
   Inventory.Icon PINVA0
   +AUTOACTIVATE
   States
   {
   Spawn:
      PINV A 1 Bright
      Loop
   USE: 
      PINV B 1 A_FireCustomMissile("BeeSpawner",0,1,0,0) 
      stop
   } 
}

ACTOR test3 : CUSTOMInventory
{
   +INVBAR
   Inventory.Amount 1
   Inventory.MaxAmount 100
   Inventory.PickupSound "misc/i_pkup"
   Inventory.UseSound "misc/p_pkup"
   Inventory.PickupMessage "TEST3"
   Inventory.Icon PINVA0
   +AUTOACTIVATE
   States
   {
   Spawn:
      PINV A 1 Bright
      Loop
   USE: 
      PINV B 1 A_FireCustomMissile("ElementalFire",0,1,0,0) 
      stop
   } 
}

ACTOR test2 : CUSTOMInventory
{
   +INVBAR
   Inventory.Amount 1
   Inventory.MaxAmount 100
   Inventory.PickupSound "misc/i_pkup"
   Inventory.UseSound "misc/p_pkup"
   Inventory.PickupMessage "TEST2"
   Inventory.Icon PINVA0
   +AUTOACTIVATE
   States
   {
   Spawn:
      PINV ABCD 6 Bright
      Loop
   USE: 
      PINV B 1 A_FireCustomMissile("Magicmissile",0,1,0,0) 
      stop
   } 
}

ACTOR test1 : CUSTOMInventory
{
   +INVBAR
   Inventory.Amount 1
   Inventory.MaxAmount 100
   Inventory.PickupSound "misc/i_pkup"
   Inventory.UseSound "misc/p_pkup"
   Inventory.PickupMessage "TEST1"
   Inventory.Icon PINVA0
   +AUTOACTIVATE
   States
   {
   Spawn:
      PINV ABCD 6 Bright
      Loop
   USE: 
      PINV B 1 A_FireCustomMissile("ManaMissile",0,1,0,0) 
      stop
   } 
}

ACTOR runeadd : ammo
{
   Inventory.MaxAmount 100
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 100
}

ACTOR WATER : Ammo


{
   Inventory.MaxAmount 100
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 100
}

ACTOR FOOD : Ammo
{
   Inventory.MaxAmount 100
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 100
}

ACTOR AAMANA : Ammo
{
   Inventory.MaxAmount 100
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 100
}
